package com.learn.xueer.ui.viewmodel

import androidx.lifecycle.MutableLiveData
import com.blankj.utilcode.util.GsonUtils
import com.learn.xueer.app.network.apiService
import com.learn.xueer.data.model.bean.PkRecordResponse
import com.youth.banner.util.LogUtils
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.request

class PkUserInfoViewModel : BaseViewModel() {

    var pkRecordData = MutableLiveData<PkRecordResponse>()

    fun getPkRecord() {
        request({ apiService.pkRecord() }, {
            LogUtils.e("-------------")
            LogUtils.e(GsonUtils.toJson(it))
            LogUtils.e("-------------------------------")
            it?.let { pkRecordData.value = it }
        }, {}, true)
    }
}